//
//  KKSwitchBarView.h
//  掌中陕西
//
//  Created by Kratos on 14-8-7.
//  Copyright (c) 2014年 RM. All rights reserved.
//  选择栏

#import <UIKit/UIKit.h>

#undef weak_delegate
#if __has_feature(objc_arc) && __has_feature(objc_arc_weak)
#define weak_delegate weak
#else
#define weak_delegate unsafe_unretained
#endif

@interface FontSizeButtonObject : NSObject
@property (nonatomic , assign)  NSInteger fontSize;
@property (nonatomic , copy  )  NSString *buttonTitle;
@property (nonatomic , strong)  UIColor *buttonTitleDefaultColor;
@property (nonatomic , strong)  UIColor *buttonTitleSelectedColor;
@property (nonatomic , strong)  NSString *buttonDefaultImage;
@property (nonatomic , strong)  NSString *buttonSelectedImage;
@property (nonatomic , strong)  NSString *buttonBackgroudDefaultImage;
@property (nonatomic , strong)  NSString *buttonBackgroudSelectedImage;
@end


@class KKSwitchBarView;
@protocol KKSwitchBarViewDelegate <NSObject>
@optional

-(void)switchBarSelectedIndex:(NSUInteger)index switchBar:(KKSwitchBarView *)switchBar;

@end

typedef void(^KKSwitchBarViewSelectedBlock)(NSInteger selectedIndex);

@interface KKSwitchBarView : UIView
@property (nonatomic , copy)   KKSwitchBarViewSelectedBlock selectedBlock;
@property (nonatomic , weak) IBOutlet id<KKSwitchBarViewDelegate> delegate;

/**
 * 初始化函数
 * @param fontSizeInfo 字体大小信息
 * @param selected 初始化时选中位置
 * @param frame 界面大小
 * @return
 * @author Kratos
 */
- (instancetype)initWithFontSizeBtnInfo:(NSArray *)fontSizeInfo selectedIndex:(NSInteger)selected frame:(CGRect)frame;

/**
 * 设置添加界面上的按钮
 * @param fontSizeInfo 字体信息
 * @return void
 * @author Kratos
 */
- (void)setFontSizeBtns:(NSArray *)fontSizeInfo selectedIndex:(NSInteger) selected;

- (void)setDefaultSelectedIndex:(NSInteger)index;

@end


